{% extends "page.html" %}


{% block stylesheet %}
    {{super()}}
    <link rel="stylesheet" href="{{ static_url("auth/css/override.css") }}" type="text/css" />
{% endblock %}

{% block login_widget %}
{% endblock %}

{% block site %}

    <div id="ipython-main-app" class="container">

        {% if login_available %}
            {# login_available means password-login is allowed. Show the form. #}
            <div class="row">
                <div class="navbar col-sm-8">
                    <div class="navbar-inner">
                        <div class="container">
                            <div class="center-nav">
                                <form action="{{base_url}}login?next={{next}}" method="post" class="">
                                    {{ xsrf_form_html() | safe }}
                                    <div class="form-group">
                                        <label for="name_input"><strong>{% trans %}Username:{% endtrans %}</strong></label>
                                        <input type="text" name="username" id="name_input" class="form-control">
                                    </div>
                                    <div class="form-group">
                                        <label for="password_input"><strong>{% trans %}Password:{% endtrans %}</strong></label>
                                        <input type="password" name="password" id="password_input" class="form-control">
                                    </div>

                                    <div class="form-group">
                                        <button type="submit" class="btn btn-default" id="login_submit">{% trans %}Log in{% endtrans %}</button>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        {% endif %}
        <div class="row">
            test row <br>
            {{ message }} <br>
        </div>
        {% if message %}
            <div class="row">
                {% for key in message %}
                    <div class="message {{key}}">
                        {{message[key]}}
                    </div>
                {% endfor %}
            </div>
        {% endif %}
    </div>

{% endblock %}


{% block script %}
    {{super()}}

    <script type="text/javascript">
        require(["auth/js/main"], function (auth) {
            auth.login_main();
        });
    </script>

{% endblock %}
